package com.atguigu.core.controller;


import cn.hutool.core.util.IdUtil;
import com.atguigu.core.bean.R;
import com.atguigu.core.repository.TPayRepository;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * <p>
 * 交易支付表 前端控制器
 * </p>
 *
 * @author kashim
 * @since 2024-04-16
 */
@Tag(name = "支付接口 （断路器版）")
@RestController
@RequestMapping("/pay-micrometer")
public class PayMicrometerController {
    @Autowired
    private TPayRepository tPayRepository;

    @Operation(summary = "查询支付")
    @GetMapping("/micrometer/{id}")
    public R micrometer(@PathVariable("id") Integer id) {

        return R.ok().data("hello,micrometer! input id:" + id + "\t" + IdUtil.simpleUUID());
    }



}

